<?php
abstract class RestController extends Zend_Rest_Controller
{
	/**
     * Word delimiters (used for normalizing view script paths)
     * @var Zend_Db_Adapter_Abstract
     */
	protected $db = null;
	
	/**
     * DataBase
     * @var Zend_Db_Adapter_Abstract
     */
	public function getDB()
	{
		return $this->db;
	}
	public function init()
	{
		$this->_helper->viewRenderer->setNoRender();
		$bootstrap = $this->getInvokeArg('bootstrap');
		$resource = $bootstrap->getPluginResource('db');
		$this->db = $resource->getDbAdapter();
	}
}